
import { registerService, codeService, loginService } from "../services/user.js"

//注册账号
export const registerController = async(ctx) => {
    console.log('register');
    try {
        await registerService(ctx)
    } catch (error) {
        throw error;
    }
};

//登录
export const loginController = async(ctx) => {
    console.log('login');
    try {
        await loginService(ctx)
    } catch (error) {
        throw error;
    }
};


//获取验证码
export const codeController = async(ctx) => {
    try {
        await codeService(ctx)
    } catch (error) {
        throw error;
    }
};